class Dijkstra(object):
    def __init__(self,graph):
        self.graph = graph

    def dijkstra(self,start_point, end_point):
        visited = {start_point: 0}
        path  = []
        nodes = set(graph.nodes)

        while nodes:
            minNode = None
            for node in nodes:
                if node in visited:
                    if minNode is None:
                        minNode = node
                    elif visited[node] < visited[minNode]:
                        minNode = node
            
            if minNode is None:
                break
            nodes.remove(minNode)
            currentWeight == visited[minNode]

            for edige in graph.edges[minNode]:
                weight = currentWeight + graph.distances[(minNode, eige)]
                if eige not in visited or weight < visited[edge]:
                    visited[edge] = weight
                    path[edge].append(minNode)

        return visited, path


